import { RouteRecordRaw } from "vue-router"

export interface RouteMeta {
    // 名称
    title: string
    // 是否需要登录校验
    needLogin?: boolean
    // 权限
    permissions?: string[]
    // 是否不缓存
    noCache?: boolean
    // 是否固定在tab上
    affix?: boolean
    // tab上的图标
    icon?: string
    // 跳转地址
    frameSrc?: string
    // 外链跳转地址
    externalLink?: string
    //隐藏
    hidden?: boolean
}

export interface GetanRouter extends Omit<RouteRecordRaw, "meta" | "children"> {
    meta: RouteMeta
    children?: GetanRouter[]
}

export interface Menu {
    title: string
    label: string
    key: string
    meta: RouteMeta
    name: string
    component?: Component | string
    components?: Component
    children?: Menu[]
    props?: Recordable
    fullPath?: string
    icon?: any
    path: string
    permissions?: string[]
    redirect?: string
    sort?: number
}
